import java.util.ArrayDeque;
import java.util.Deque;
import java.util.LinkedList;

public class Test {
    public static void main(String[] args) {
        Deque<Integer> deque = new LinkedList<>();
        deque.addFirst(1);
        deque.addFirst(2);

        System.out.println(deque.pollLast());


        Deque<Integer> deque2 = new ArrayDeque<>();

    }
}
